/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.edu.com1263.model;

import java.io.Serializable;
import java.util.Collection;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;


/**
 *
 * @author Luiz Cardoso
 */
@Entity
@Table(name="horario")
public class Horario implements Serializable {
    
	private static final long serialVersionUID = 1145044791793649333L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id_horario")
	private Long id;
	
    @Column(name="horario",nullable=false)
    private String hora;
    
    
    @OneToMany(cascade = { CascadeType.ALL }, mappedBy = "horario")
	private Collection<Turma> turmas;
    
    
    public Horario(){
        
    }

    public Horario(String hora) {
        this.hora = hora;
    }



	/**
     * @return the codCurso
     */

    public String getHorario() {
        return hora;
      
    }

    public void setHora(String hora) {
		this.hora = hora;
	}

	public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
  
    /**
     * @param horario the codCurso to set
     */
    public void seHora(String hora) {
        this.hora = hora;
    }

   

	public Collection<Turma> getTurmas() {
		return turmas;
	}

	public void setTurmas(Collection<Turma> turmas) {
		this.turmas = turmas;
	}

	public String getHora() {
		return hora;
	}

	
    
    


}
